<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Service\Admin;
use App\Model\ActionLog;
use Hyperf\Database\Model\Model;
use Hyperf\Di\Annotation\Inject;

class ActionLogService
{
    #[Inject]
    protected ActionLog $actionLogModel;
    /**
     * 保存用户的操作日志.
     * @param array $log
     * @return ActionLog|Model
     */
    public function saveLog(array $log): Model|ActionLog
    {
        return $this->actionLogModel->create($log);
    }
}
